package com.yfp.client.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yfp.client.domain.ClientIntegral;

import java.util.List;

/**
 * @Description: 客户积分
 * 
 * @CreateDate: 2024/8/1 14:38
 * @UpdateUser: 
 * @UpdateDate: 2024/8/1 14:38
 * @UpdateRemark: 暂无修改
 * @Version: 1.0
 */
public interface ClientIntegralService extends IService<ClientIntegral> {
    /**
     * 查询积分明细
     *
     * @param clientId
     * @return
     */
    List<ClientIntegral> getByClientId(String clientId);

    /**
     * 统计积分
     *
     * @param clientId
     * @return
     */
    int sumIntegralByClientId(String clientId);

    /**
     * 添加积分
     *
     * @param clientIntegral
     * @return
     */
    int insert(ClientIntegral clientIntegral);

    /**
     * 修改状态
     *
     * @param orderId
     * @param status
     * @return
     */
    int editStatusByOrderId(String orderId, Integer status);

    ClientIntegral findByOrderId(String orderId);
}
